package me.zhengjie.modules.weixin.message.reply;


import me.zhengjie.modules.weixin.enums.WeChatMsgTypeEnum;
import org.apache.commons.lang3.StringUtils;

/**
 * 被动回复视频消息
 *
 */
public class ReplyVideoMessage extends AbstractReplyMessage {

    public ReplyVideoMessage() {
        super();
        setMsgType(WeChatMsgTypeEnum.video.name());
    }

    public ReplyVideoMessage(String mediaId, String title, String description) {
        this();
        VideoMessage video = new VideoMessage();
        video.MediaId = mediaId;
        video.Title = title;
        video.Description = description;
        this.Video = video;
    }

    private VideoMessage Video;

    public VideoMessage getVideo() {
        return Video;
    }

    public void setVideo(VideoMessage video) {
        Video = video;
    }

    public static class VideoMessage {

        private String MediaId;

        private String Title;

        private String Description;

        public String getMediaId() {
            return MediaId;
        }

        public void setMediaId(String mediaId) {
            MediaId = mediaId;
        }

        public String getTitle() {
            return Title;
        }

        public void setTitle(String title) {
            Title = title;
        }

        public String getDescription() {
            return Description;
        }

        public void setDescription(String description) {
            Description = description;
        }
    }

    @Override
    public boolean isValidReply() {
        return null != Video && StringUtils.isNotBlank(Video.MediaId);
    }
}
